<!-- HTML5文件 -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
		<title>列表页</title>
		<link rel="stylesheet" href="assets/agile/css/agile.layout.css">
		<link rel="stylesheet" href="assets/agile/css/flat/flat.component.css">
		<link rel="stylesheet" href="assets/agile/css/flat/flat.color.css">
		<link rel="stylesheet" href="assets/agile/css/flat/iconline.css">
		<link rel="stylesheet" href="assets/agile/css/flat/iconform.css">
		<link rel="stylesheet" href="assets/component/timepicker/timepicker.css">
		<link rel="stylesheet" href="assets/app/css/app.css">
		<link rel="stylesheet" href="assets/my/common/style.css" />
	</head>
	<body>
		<div id="section_container">
			<section id="form_section" data-role="section" class="active">
				<header>
					<div class="titlebar">
						<a data-toggle="html" href="#home"><i class="iconfont iconline-arrow-left"></i></a>
						<h1 class="title">我的交易卡</h1>
						<a data-role="tab" href="#addCard" data-toggle="html"><span class="ring_right">新添交易卡</span></a>
					</div>
				</header>
				<article data-role="article" id="main_article" data-scroll="verticle" class="active" style="top:44px;bottom:0px;">
					<div class="scroller"> 
						
						<ul class="listitem ">
							 <script id="template" type="text/html">
							 <% for (i = 0; i < ObjectList.length; i ++) { %>
							 <li class="ring_list-padding">
						      	<div class="text ring_list-padding">
						      		<font>市场:</font><font style="padding-left:5px;"><%= ObjectList[i].MarketName %></font>
						      		<br/><br/>
						      		<font><%= ObjectList[i].CustomerType %></font>:<font style="padding-left:5px;"><%= ObjectList[i].CustomerName %></font>
				                	<font font style="padding-left:40px;">卡号:</font><font class="iconfont" style="padding-left:5px"><%= ObjectList[i].CustomerCode %></font>
						      	</div>
						      	<a href="card.html?id=<%= ObjectList[i].CustomerID %>&sc=<%= ObjectList[i].MarketID %>" data-toggle="html" class="navigate-right">
						      	<i class="ricon iconfont iconline-arrow-right" style="padding-right:15px;"></i>
						      	</a>
							 </li>
							 <% } %>
							 </script>
						</ul>
						
					</div>
				</article>				
			</section>
		</div>

		<!--- third --->
		<script src="assets/third/jquery/jquery-2.1.3.min.js"></script>
		<script src="assets/third/jquery/jquery.mobile.custom.min.js"></script>
		<script src="assets/third/iscroll/iscroll-probe.js"></script>
		<script src="assets/third/arttemplate/template-native.js"></script>
		<!-- agile -->
		<script type="text/javascript" src="assets/agile/js/agile.js"></script>
		<!--- bridge --->
		<script type="text/javascript" src="assets/bridge/exmobi.js"></script>
		<script type="text/javascript" src="assets/bridge/agile.exmobi.js"></script>
		<!-- app -->
		<script src="assets/component/timepicker/agile.timepicker.js"></script>
		<script type="text/javascript" src="assets/component/extend.js"></script>
		<script type="text/javascript" src="assets/app/js/app.js"></script>
		<!-- my -->
		<script type="text/javascript" src="assets/my/common/my.js"></script>
		<script>
		$('#main_article').on('articleload', function(){//监听主页面打开事件,判断是否有COOKIE,并进行自动登录.
			if(getCookie("UserID")>0){
				var _url=encodeURIComponent("http://182.92.241.133:8001/API/FrontBackInf/GetMyCardList?UserID="+getCookie("UserID"));
				myAjax(_url,changePage);//进行跨域请求json
			}else{
				A.alert('错误','请先进行登陆操作',function(){
				    A.Controller.html("login.html"); 
				});
			}
		});
		function changePage(json){//供跨域请求获取到的json反向操作cookie
			A.template('#template').renderReplace(json);
		};
		</script>
	</body>
</html>